<template>
  <div class="jzd_content">
    <navTop :headTitle="headTitle" :showBack="showBack" style="margin-bottom:2.5rem"></navTop>
    <p class="jzd_0">{{$route.query.item.STATUS | filterYuYueStatus}}</p>
    <div class="jzd_111">
      <span v-show="showaveter == 'S'">
        <img :src="root+$route.query.item.DOCTOR_PIC_URL" alt="">
      </span>
      <span>
        <p><b style="color:black">医生信息：</b>{{$route.query.item.DOCTOR_NAME}}&nbsp;{{$route.query.item.ZYDJ}}</p>
        <!-- <nuxt-link tag="p" to="/yuyue/doctorPage">{{$route.query.item.DOCTOR_NAME}}<i class="iconfont icon-weibiaoti34" style="padding-left:6rem;float:right;font-size:1.5rem;color:#aaa"></i></nuxt-link> -->
        <!-- <p>{{$route.query.item.ZYDJ}}</p> -->
      </span>
    </div>
    <div class="jzd_2">
      <p>
        <span>就诊信息</span>
        <span>
          <mt-switch v-model="if_first">是否初诊</mt-switch>
        </span>
      </p>
      <p>候诊时间<b>{{$route.query.item.PRETIME}}</b></p>
      <p>就诊科室<b>{{$route.query.item.SSKBMC}}</b></p>
      <!-- <p>门诊类型<b>{{$route.query.item.PRE_TYPE}}</b></p> -->
    </div>
    <div class="jzd_2">
      <p>就诊人信息
        <!-- <nuxt-link tag="b" to="/yuyue/newPatientlist" style="float:right">修改<i class="iconfont icon-weibiaoti34"></i></nuxt-link> -->
      </p>
      <p>就诊人：<b style="font-size:0.9rem;color:#aaa">{{$route.query.item.PATIENT_NAME}} /{{$route.query.item.PATIENT_SEX}}{{$route.query.item.PATIENT_AGE}}岁 /{{$route.query.item.COST_TYPE}}</b></p>
      <p>手机：<b style="font-size:0.9rem;color:#aaa">{{$route.query.item.PATIENT_MOBILE}}</b></p>
    </div>
    <!--     <div class="jzd_4">
      <p>立即预约</p>
    </div> -->
  </div>
</template>

<script>
import navTop from '~/components/common/navTop.vue';

const { config } = window;

export default {
  data() {
    return {
      showaveter: `${config.SHOWAEVTER}`,
      headTitle: '预约详情',
      showBack: true, // 是否显示返回箭头
      if_first: this.$route.query.item.IS_FIRST == 'f',
      root: `${config.APIRoot}/doctor`,
    };
  },
  components: {
    navTop,
  },
  filters: {
    // f-预约失败 s-预约成功 c-取消预约 v-就诊
    filterYuYueStatus(value) {
      if (!value) return '';
      switch (value) {
        case 'f':
          return '预约失败';
        case 's':
          return '预约成功';
        case 'c':
          return '取消预约';
        case 'v':
          return '就诊';
        default:
          return '';
      }
    },
  },
};
</script>

<style lang="stylus">
.mint-switch-core::after
    height 20px
.mint-switch-core::before
    height 20px
.mint-switch-core
    height 23px
.jzd_0
    height 3rem
    line-height 3rem
    font-size 1rem
    text-align center
    background #eaf24b
.jzd_111
    height 3rem
    line-height 3rem
    font-size 1rem
    margin 0 1rem
    img
        width 4rem
        height 4rem
        border-radius 50%
    span
        float left
        display inline-block
        &:first-child
            width 4rem
            height 4rem
            background #aaa
            border-radius 50%
            margin 0.5rem
            text-align center
            line-height 4rem
        &:last-child
            width 100%
            p
                height 1rem
                line-height 1rem
                border none
                margin 1rem 0
                &:last-child
                    max-width 100vw
                    overflow: hidden;
                    text-overflow:ellipsis;
                    white-space: nowrap;
                    font-size 0.9rem
                    color #aaa
.jzd_2
    p
        height 3rem
        line-height 3rem
        font-size 1rem
        padding 0 0.8rem
        border-bottom 1px solid #eee

        &:first-child
            display flex
            justify-content space-between
            background #f1f1f1
            font-size 0.9rem
            color #aaa
        b
            color #aaa
            margin-left 1rem
            font-size 0.9rem
.jzd_4
    position fixed
    bottom 0
    background #26a2ff
    font-size 1rem
    color #fff
    width 100%
    text-align center
    padding 0.8rem 0
</style>

